/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package vn.webapp.model;

import java.io.Serializable;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;
import vn.webapp.dto.DataPage;

/**
 *
 * @author Tonytran
 */
@Entity
@Table(name = "timetabling")
public class Timetablingraw implements Serializable {

    @Id
    @GeneratedValue
    @Column(name = "timetabling_id")
    private int timetabling_id;
    
    @Column(name = "courseteacher_id")
    private int courseteacher_id;
    
    @Column(name = "day")
    private int day;
    
    @Column(name = "slot")
    private int slot;
    
    @Column(name = "room_id")
    private int room_id;
    
    @Column(name = "course_id")
    private int course_id;
    
    @Column(name = "session_id")
    private int session_id;
    
    @Column(name = "teacher_id")
    private int teacher_id;
    
    @Column(name = "class_id")
    private int class_id;
    
    @Column(name = "timerange")
    private int timerange;
    
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name="room_id", insertable = false, updatable = false, nullable = false, unique = true)
    public Rooms rooms;
    
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name="course_id", insertable = false, updatable = false, nullable = false, unique = true)
    public Courses courses;
    
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name="session_id", insertable = false, updatable = false, nullable = false, unique = true)
    public Sessions sessions;
    
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name="teacher_id", insertable = false, updatable = false, nullable = false, unique = true)
    public Teachers teachers;
    
    @OneToOne(cascade = CascadeType.ALL, fetch = FetchType.EAGER)
    @JoinColumn(name="class_id", insertable = false, updatable = false, nullable = false, unique = true)
    public Classes classes;
    
    public int getTimetabling_id() {
        return timetabling_id;
    }

    public void setTimetabling_id(int timetabling_id) {
        this.timetabling_id = timetabling_id;
    }

    public int getCourseteacher_id() {
        return courseteacher_id;
    }

    public void setCourseteacher_id(int courseteacher_id) {
        this.courseteacher_id = courseteacher_id;
    }

    public int getRoom_id() {
        return room_id;
    }

    public void setRoom_id(int room_id) {
        this.room_id = room_id;
    }


    public int getDay() {
        return day;
    }

    public void setDay(int day) {
        this.day = day;
    }

    public int getSlot() {
        return slot;
    }

    public void setSlot(int slot) {
        this.slot = slot;
    }

    public Rooms getRooms() {
        return rooms;
    }

    public void setRooms(Rooms rooms) {
        this.rooms = rooms;
    }

    public int getCourse_id() {
        return course_id;
    }

    public void setCourse_id(int course_id) {
        this.course_id = course_id;
    }

    public int getSession_id() {
        return session_id;
    }

    public void setSession_id(int session_id) {
        this.session_id = session_id;
    }

    public int getTeacher_id() {
        return teacher_id;
    }

    public void setTeacher_id(int teacher_id) {
        this.teacher_id = teacher_id;
    }

    public int getClass_id() {
        return class_id;
    }

    public void setClass_id(int class_id) {
        this.class_id = class_id;
    }

    public Courses getCourses() {
        return courses;
    }

    public void setCourses(Courses courses) {
        this.courses = courses;
    }

    public Sessions getSessions() {
        return sessions;
    }

    public void setSessions(Sessions sessions) {
        this.sessions = sessions;
    }

    public Teachers getTeachers() {
        return teachers;
    }

    public void setTeachers(Teachers teachers) {
        this.teachers = teachers;
    }

    public Classes getClasses() {
        return classes;
    }

    public void setClasses(Classes classes) {
        this.classes = classes;
    }

    public int getTimerange() {
        return timerange;
    }

    public void setTimerange(int timerange) {
        this.timerange = timerange;
    }
}
